package com.example.myapplication.rxjava;


import com.orhanobut.logger.Logger;

import io.reactivex.Observable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;

/**
 * 类描述:
 * 创建人:   tangchao$
 * 创建时间: 2021/8/20$ 8:48 AM$
 * 联系方式: 419704299@qq.com
 * 修改人:   tangchao$
 * 修改时间: 2021/8/20$ 8:48 AM$
 * 修改备注:  [说明本次修改内容]
 */
public class TextRxjava {
    public static void main(String[] args) {
        test1();

    }

    private static void test1() {
        Observable.just(11).map(new Function<Integer, Object>() {
            @Override
            public Object apply(Integer integer) throws Exception {
                return integer + "aa";
            }
        })
                .subscribeOn(Schedulers.io()).subscribe(new Consumer() {
            @Override
            public void accept(Object o) throws Exception {
                Logger.d("TextRxjava===accept: ");
                System.out.println("00000==" + o);
            }
        });
    }
}
